|
 |
"Nicolas George" <nicolas$george@salle-s.org> wrote in message
news:46f1088f$1@news.povray.org...
> use Colors;
>
> scene [
>
> camera [
> location => [ 2, 5, -3 ],
> look_at => [ 0, 0, 0 ]
> ],
>
> light_source [
> [ 0, 10, -2 ],
> White
> ],
>
> union [
> box [
> [ -1, -1, -1 ], [ 1, 1, 1 ],
> pigment => Red
> ],
> sphere [
> [ 0, 1.5, 0 ], 0.5
> pigment => Yellow
> ]
> ]
>
> ]
I prefer the current syntax actually. All the commas after ] seem completely
redundant, the keyword scene is a nice idea if it would be possible to
define multiple scenes in one file, but it should be optional.
The line "use Colors;" seems completely out of place for two reasons: first,
Colors what? Colors.inc ? Colors.pov ? ..? second, considering the rest of
the syntax, wouldn't something like "include [colors.inc,textures.inc]" be
more consistent?
I also don't like the change from curly brackets to square brackets.
Actually I think a new SDL should look more or less the same as the old one,
ie. a C-like syntax, but with some new things, like cleaner syntax, OO, ...
For example: instead of '#declare X=1;' you would have something like 'float
X=1;' (I don't think there's need for both int and float, since, afaik
internally it's all floats).
However, there are many things in the current SDL that I actually like,
although they might be considered weird by programmers.
For example, maybe it would be cleaner to have something like:
Camera ActiveCamera = new Camera();
ActiveCamera.location = new Vector(0,0,1);
ActiveCamera.lookAt = new Vector(0,0,0);
But it's a lot easier, especially for non-programmers, the way it is now:
camera {
location z
look_at 0
}
But well, I suppose making a cleaner, stricter syntax will always lead to
having a more difficult to learn syntax :(
cu!
--
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x) // ZK http://www.povplace.com
Post a reply to this message
|
 |